#!/usr/bin/env python

from optparse import OptionParser
from qt_create import create_qt_ros_catkin_package

if __name__ == "__main__":
    parser = OptionParser(usage="usage: %prog <package-name> [dependencies...]")
    options, args = parser.parse_args()
    if not args:
        parser.error("you must specify a package name and optionally also list package dependencies")
    package = args[0]

    # no checking dependencies like old roscreate-pkg did
    # since we are usually not in a shell
    depends = args[1:]
    depends = ''.join(['  <build_depend>{0}</build_depend>\n  <run_depend>{0}</run_depend>\n' .format(d) for d in depends])

    create_qt_ros_catkin_package(package, depends )
    print "\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package


